﻿using OnlineLearningSystem.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OnlineLearningSystem.IRepository
{
    public interface IUserRepository
    {
        /// <summary>
        /// 创建实体
        /// </summary>
        /// <param name="entity"></param>
        void Create(User entity);

        /// <summary>
        /// 条件查询单个实体
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        User Get(string str);

        User Get(Func<User, bool> wherelambda);

        /// <summary>
        /// 查询所有实体
        /// </summary>
        /// <returns></returns>
        List<User> GetAll();

        //List<User> GetAll(Func<User, bool> wherelambda);

        List<User> GetAll(dynamic user);

        /// <summary>
        /// 更新实体
        /// </summary>
        /// <param name="user"></param>
        void Update(User user);
    }
}
